// 设计表格样式
function Design(num,width,r_num){
    $(".ui-grid-caption,.ui-grid,.ui-grid-row").css("width",""+pageWidth()+"px");
    var p_width = parseInt((pageWidth()-width-17)/num);
    var row_width = p_width*num+width+num+r_num-20;
    var row_min_width = 80*num+width+num+r_num-20;
    var caption_min_width = row_min_width+17;
    $(".ui-grid-row").css("width",""+row_width+"px");
    $(".ui-grid-caption").css("min-width",""+caption_min_width+"px");
    $(".ui-grid-row").css("min-width",""+row_min_width+"px");
    //设置表格标题
    $(".ui-grid-caption span").css("width",""+parseInt((pageWidth()-width-17)/num)+"px");
    $(".ui-grid-caption span").css("min-width","80px");
    $(".ui-grid-caption span:first-child").css("width","30px");
    $(".ui-grid-caption span:first-child").css("min-width","30px");
    //设置表格内容
    $(".ui-grid span").css("width",""+parseInt((pageWidth()-width-17)/num)+"px");
    $(".ui-grid span").css("min-width","80px");
    $(".ui-grid-row span:first-child").css("width","30px");
    $(".ui-grid-row span:first-child").css("min-width","30px");
}
/*
    ! import Base64Helper.js
*/
//编码转换UTF16 转为UTF8
String.prototype.UTF16To8 = function () {
    var str = this;
    var ret = "", i, len, charCode;
    len = str.length;
    for (i = 0; i < len; i++) {
        charCode = str.charCodeAt(i);
        if ((charCode >= 0x0001) && (charCode <= 0x007F)) {
            ret += str.charAt(i);
        } else if (charCode > 0x07FF) {
            ret += String.fromCharCode(0xE0 | ((charCode >> 12) & 0x0F));
            ret += String.fromCharCode(0x80 | ((charCode >> 6) & 0x3F));
            ret += String.fromCharCode(0x80 | ((charCode >> 0) & 0x3F));
        } else {
            ret += String.fromCharCode(0xC0 | ((charCode >> 6) & 0x1F));
            ret += String.fromCharCode(0x80 | ((charCode >> 0) & 0x3F));
        }
    }
    return ret;
}
//编码转换UTF8 转为UTF16
String.prototype.UTF8To16 = function () {
    var str = this;
    var ret = "",i = 0,len, charCode;
    var charCode2, charCode3;
    len = str.length;
    while (i < len) {
        charCode = str.charCodeAt(i++);
        switch (charCode >> 4) {
            case 0:
            case 1:
            case 2:
            case 3:
            case 4:
            case 5:
            case 6:
            case 7:
                ret += str.charAt(i - 1);
                break;
            case 12:
            case 13:
                charCode2 = str.charCodeAt(i++);
                ret += String.fromCharCode(((charCode & 0x1F) << 6) | (charCode2 & 0x3F));
                break;
            case 14:
                charCode2 = str.charCodeAt(i++);
                charCode3 = str.charCodeAt(i++);
                ret += String.fromCharCode(((charCode & 0x0F) << 12) | ((charCode2 & 0x3F) << 6) | ((charCode3 & 0x3F) << 0));
                break;
        }
    }
    return ret;
}
//编码为64位
String.prototype.EncodeBase64 = function () {
    var str = this;
    str = str.UTF16To8();
    var base64EncodeChars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
    var ret = "",i = 0,len;
    var charCode1, charCode2, charCode3;
    len = str.length;
    while (i < len) {
        charCode1 = str.charCodeAt(i++) & 0xff;
        if (i == len) {
            ret += base64EncodeChars.charAt(charCode1 >> 2);
            ret += base64EncodeChars.charAt((charCode1 & 0x3) << 4);
            ret += "==";
            break;
        }
        charCode2 = str.charCodeAt(i++);
        if (i == len) {
            ret += base64EncodeChars.charAt(charCode1 >> 2);
            ret += base64EncodeChars.charAt(((charCode1 & 0x3) << 4) | ((charCode2 & 0xF0) >> 4));
            ret += base64EncodeChars.charAt((charCode2 & 0xF) << 2);
            ret += "=";
            break;
        }
        charCode3 = str.charCodeAt(i++);
        ret += base64EncodeChars.charAt(charCode1 >> 2);
        ret += base64EncodeChars.charAt(((charCode1 & 0x3) << 4) | ((charCode2 & 0xF0) >> 4));
        ret += base64EncodeChars.charAt(((charCode2 & 0xF) << 2) | ((charCode3 & 0xC0) >> 6));
        ret += base64EncodeChars.charAt(charCode3 & 0x3F);
    }
    return ret;
}
//解码为64位
String.prototype.DecodeBase64 = function () {
    var str = this;
    str = str.UTF16To8();
    var base64DecodeChars = new Array(-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
        -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 62, -1, -1, -1, 63,
        52, 53, 54, 55, 56, 57, 58, 59, 60, 61, -1, -1, -1, -1, -1, -1, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
        15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, -1, -1, -1, -1, -1, -1, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
        41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, -1, -1, -1, -1, -1);
    var charCode1, charCode2, charCode3, charCode4;
    var ret = "",i = 0,len;
    len = str.length;
    while (i < len) {
        do {
            charCode1 = base64DecodeChars[str.charCodeAt(i++) & 0xff];
        } while (i < len && charCode1 == -1);
        if (charCode1 == -1) break;
        do {
            charCode2 = base64DecodeChars[str.charCodeAt(i++) & 0xff];
        } while (i < len && charCode2 == -1);
        if (charCode2 == -1) break;
        ret += String.fromCharCode((charCode1 << 2) | ((charCode2 & 0x30) >> 4));
        do {
            charCode3 = str.charCodeAt(i++) & 0xff;
            if (charCode3 == 61) return ret;
            charCode3 = base64DecodeChars[charCode3];
        } while (i < len && charCode3 == -1);
        if (charCode3 == -1) break;
        ret += String.fromCharCode(((charCode2 & 0XF) << 4) | ((charCode3 & 0x3C) >> 2));
        do {
            charCode4 = str.charCodeAt(i++) & 0xff;
            if (charCode4 == 61) return ret;
            charCode4 = base64DecodeChars[charCode4];
        } while (i < len && charCode4 == -1);
        if (charCode4 == -1) break;
        ret += String.fromCharCode(((charCode3 & 0x03) << 6) | charCode4);
    }
    return ret;
}

function getwebdatatree(pwstr, pwid, pcid, jc) {
    var json = "";
    var purl;
    switch (jc) {
        case 0:
            purl = "QFWebservice.asmx/GetJsonTree";
            break;
        case 1:
            purl = "../QFWebservice.asmx/GetJsonTree";
            break;
        case 2:
            purl = "../../QFWebservice.asmx/GetJsonTree";
            break;
        case 3:
            purl = "../../../QFWebservice.asmx/GetJsonTree";
            break;
    };
    var cs = $.cookie('ustr');
    $.ajax({
        type: "post",
        async: false,
        url: purl,
        data: {
            wstr: pwstr.toString().EncodeBase64(),
            wid: pwid.toString().EncodeBase64(),
            cid: pcid.toString().EncodeBase64(),
            str: cs.toString().EncodeBase64()
        },
        dataType: "xml",
        success: function (e) {
            json = $(e).text();
        }
    });
    return json.toString().DecodeBase64().UTF8To16();
}
//增、删、改数据
function setwebdata(original, keyname, wid, jc) {
    var json = "W10=";
    var purl;
    switch (jc) {
        case 0:
            purl = "QFWebservice.asmx/SetJson";
            break;
        case 1:
            purl = "../QFWebservice.asmx/SetJson";
            break;
        case 2:
            purl = "../../QFWebservice.asmx/SetJson";
            break;
        case 3:
            purl = "../../../QFWebservice.asmx/SetJson";
            break;
    };
    var cs = $.cookie('ustr');
    $.ajax({
        type: "post",
        async: false,
        url: purl,
        data: {
            original: original.toString().EncodeBase64(),
            keyname: keyname.toString().EncodeBase64(),
            wid: wid.toString().EncodeBase64(),
            str: cs.toString().EncodeBase64()
        },
        dataType: "xml",
        success: function (e) {
            json = $(e).text();
        }
    });
    return json;
}
function setcookie() {//设置cookie 有效期1天
    $.cookie('ustr', 'QFSOFT!@#$&*', { expires: 1});
}
//登陆
function setlogincookie(us, ps) {
    setcookie();
    var jjson = getwebdata(us + "###" + ps, "1", "login_admin", 1);
    if (jjson != "[]") {
        var json = eval(jjson);
        $.cookie('staid', json[0].EP_ID, {expires: 1});//用户名id
        $.cookie('Algroup', json[0].Algroup, {expires: 1});//权限id
        window.location.href = "../../main/index.html";
    }else {
        clearcookie();
        alert("用户名或密码错误！");
        $("#password").val("");
    }
}
//企业登录
function setlogin_login(id, pwd) {
    setcookie();
    var json = eval(getwebdata(id + "###" + pwd, "1", "Comlogin", 1));
    if (json != "") {
        $.cookie('name', json[0].comName, { exprise: 1 });
        $.cookie('comCode', json[0].comOrgCode, { exprise: 1 }); //id
        $.cookie('is_true', '0', { exprise: 1 }); //name
        window.location.href = "../main.html";
    } else {
        alert("用户名或密码错误");
        clearcookie();
    }
}
//获取数据
function getwebdata(pwstr, pwid, pcid, jc) {
    setcookie();
    var json = "";
    var purl;
    switch (jc) {
        case 0:
                purl = "QFWebservice.asmx/GetJson";
                break;
        case 1:
                purl = "../QFWebservice.asmx/GetJson";
                break;
        case 2:
                purl = "../../QFWebservice.asmx/GetJson";
                break;
        case 3:
                purl = "../../../QFWebservice.asmx/GetJson";
                break;
    };
    var cs = $.cookie('ustr');
    $.ajax({
        type: "post",
        async: false,
        url: purl,
        data: {
            wstr: pwstr.toString().EncodeBase64(),
            wid: pwid.toString().EncodeBase64(),
            cid: pcid.toString().EncodeBase64(),
            str: cs.toString().EncodeBase64()
        },
        dataType: "xml",
        success: function (e) {
            json = $(e).text();
        }
    });
    return json.toString().DecodeBase64().UTF8To16();
}
//培训人员登录
function setlogin_single(id, pwd,jobsId) {
    setcookie();
    //alert('122')
    if($.cookie('staffid') != '' && $.cookie('staffid') != null && $.cookie('staffid') != 0){
        alert("该浏览器已存在登录账号，请先退出当前账号");
    }else{
        var json = getwebdata(id + "###" + pwd+"###"+jobsId, "1", "singleLogin", 1);
        if (json != "[]") {
           json =eval(json);
            $.cookie('name', json[0].name, { exprise: 1 });
            $.cookie('IdNumber', json[0].IdNumber, { exprise: 1 });
            $.cookie('staffid', json[0].staffId, { exprise: 1 }); //id
            $.cookie('jobsId', json[0].AppCategory, { exprise: 1 }); //id
            $.cookie('is_true', '1', { exprise: 1 }); //name 
            $.cookie('ticket_num',json[0].ticket_num, { exprise: 1 });//ticket_num
            $.cookie('ks_time', json[0].ks_time, { exprise: 1 });//ks_time
            $.cookie('bmlb', json[0].bmlb, { exprise: 1 });//报名类型
            $.cookie('nunchoiceId', json[0].nunchoiceId, { exprise: 1 });//nunchoiceId
            //截至时间----[{"endTime":"2017-07-30 00:00:00"}]
            var end_time = eval(getwebdata(id, "1", "sel_trainning_time", 1))[0].endTime.substring(0,10);
            //登录时间----[{"time":"2017-07-20 19:33:13"}]
            var date = eval(getwebdata('','1','sql_time',1))[0].time.substring(0,10);
            if(date > end_time){
                //getwebdata(id, "1", "staff_ispay_update", 1);
            }
            window.location.href = "../main.html";
        } else {
            alert("用户名或密码错误");
            clearcookie();
        }
    }
}
 //考生登录
function ksLogin(id, pwd) {
    setcookie();

    var json = eval(getwebdata(id + "###" + pwd, "1", "ks_login", 1));
    if (json != "") {
        
       // var end_time = eval(getwebdata(json[0].IdNumber, "1", "sel_trainning_time", 1))[0].endTime.substring(0,10);
        //var date = eval(getwebdata('','1','sql_time',2))[0].time.substring(0,10);
       // if(date > end_time){
            //getwebdata(id, "1", "staff_ispay_update", 1);
        // }
        var ks_messages=eval(getwebdata(json[0].staffId, "1", "get_kspx_num", 1));
        var kspxsp_num = ks_messages[0].kspxsp_num;
        var _timecheck = ks_messages[0].timecheck;
        if (parseInt(_timecheck) == 1) {
            var json_section = eval(getwebdata(json[0].AppCategory, '1', 'sel_trainning', 1));
            if (kspxsp_num == json_section[json_section.length - 1].sectionID) {
                $.cookie('name', json[0].name, { exprise: 1 });
                $.cookie('IdNumber', json[0].IdNumber, { exprise: 1 });
                $.cookie('staffid', json[0].staffId, { exprise: 1 }); //id
                $.cookie('jobsId', json[0].AppCategory, { exprise: 1 }); //id
                $.cookie('is_true', '1', { exprise: 1 }); //name 
                $.cookie('bmlb', json[0].bmlb, { exprise: 1 });//报名类型
                window.location.href = "../Exam/onlineExam/onlineExam.html";
            } else {
                alert("您未将培训视频全部看完，不能进行考试！请先将培训视频看完");
                clearcookie();
            }
        } else {
            alert("已经过了培训考试时间，无法进入考试！");
            clearcookie();
        }
    } else {
        alert("用户名或密码错误");
        clearcookie();
        }
    
}
// ksLogin
//清除Cookie
function clearcookie() {
    $.cookie('ustr',null, { expires: -1});
    $.cookie('uname',null, {expires: -1});
    $.cookie('uid',null, {expires: -1});
    $.cookie('staffid', null, { exprise: -1 }); //id; //id
    $.cookie('IdNumber', null, { expires: -1 });
}
/***************************************End**************/
/**
 *
 * credits for this plugin go to brandonaaron.net
 * 
 * unfortunately his site is down
 *
 * @param {Object} up
 * @param {Object} down
 * @param {Object} preventDefault
 * @addtime 2014-05-13
 * @鼠标滚动事件
 * @eg:
 * $('body').mousewheel(function(event, delta) {
        if(delta<0){// 向下
            var scrollBottom = $(document).height() - $(window).height() - $(window).scrollTop();
            if(scrollBottom > 0){
                t_hight += 60;
            }
            $("#d_float").css("top",""+t_hight+"px")
        }else{//向上
            if($(window).scrollTop() > 0){
                t_hight -= 60;
            }
            $("#d_float").css("top",""+t_hight+"px")
        }
    });
 */
jQuery.fn.extend({
    mousewheel: function(up, down, preventDefault) {
        return this.hover(
            function() {
                jQuery.event.mousewheel.giveFocus(this, up, down, preventDefault);
            },
            function() {
                jQuery.event.mousewheel.removeFocus(this);
            }
        );
    },
    mousewheeldown: function(fn, preventDefault) {
        return this.mousewheel(function(){}, fn, preventDefault);
    },
    mousewheelup: function(fn, preventDefault) {
        return this.mousewheel(fn, function(){}, preventDefault);
    },
    unmousewheel: function() {
        return this.each(function() {
            jQuery(this).unmouseover().unmouseout();
            jQuery.event.mousewheel.removeFocus(this);
        });
    },
    unmousewheeldown: jQuery.fn.unmousewheel,
    unmousewheelup: jQuery.fn.unmousewheel
});
 
 
jQuery.event.mousewheel = {
    giveFocus: function(el, up, down, preventDefault) {
        if (el._handleMousewheel) jQuery(el).unmousewheel();
         
        if (preventDefault == window.undefined && down && down.constructor != Function) {
            preventDefault = down;
            down = null;
        }
         
        el._handleMousewheel = function(event) {
            if (!event) event = window.event;
            if (preventDefault)
                if (event.preventDefault) event.preventDefault();
                else event.returnValue = false;
            var delta = 0;
            if (event.wheelDelta) {
                delta = event.wheelDelta/120;
                if (window.opera) delta = -delta;
            } else if (event.detail) {
                delta = -event.detail/3;
            }
            if (up && (delta > 0 || !down))
                up.apply(el, [event, delta]);
            else if (down && delta < 0)
                down.apply(el, [event, delta]);
        };
         
        if (window.addEventListener)
            window.addEventListener('DOMMouseScroll', el._handleMousewheel, false);
        window.onmousewheel = document.onmousewheel = el._handleMousewheel;
    },
     
    removeFocus: function(el) {
        if (!el._handleMousewheel) return;
         
        if (window.removeEventListener)
            window.removeEventListener('DOMMouseScroll', el._handleMousewheel, false);
        window.onmousewheel = document.onmousewheel = null;
        el._handleMousewheel = null;
    }
};
/*********************** * @鼠标滚动事件 end ***********************************/
    /*
     *解决FF获取焦点后光标靠左边的问题
     */
    $.fn.input_setCursorPosition = function(position) {
        if (this.lengh == 0) return this;
        return $(this).input_setSelection(position, position);
    }
    $.fn.input_setSelection = function(selectionStart, selectionEnd) {
        if (this.lengh == 0) return this;
        input = this[0];
        if (input.createTextRange) {
            var range = input.createTextRange();
            range.collapse(true);
            range.moveEnd('character', selectionEnd);
            range.moveStart('character', selectionStart);
            range.select();
        } else if (input.setSelectionRange) {
            input.focus();
            input.setSelectionRange(selectionStart, selectionEnd);
        }
        return this;
    }
    $.fn.enterFocusEnd = function() {
        this.input_setCursorPosition(this.val().length);
    }
    $(function() {
        /*
         * input[type='text'],select,input[type='radio'],input[type='checkbox'],textarea,input[type='button'],input[type='password']添加回车事件
         */
        $("body").find("input[type='text'],select,input[type='radio'],input[type='checkbox'],textarea,input[type='button'],input[type='password']").each(function(i) {
            if ($(this).prop("class") != "") {
                $(this).addClass("enterFocus" + i + "");
            } else {
                $(this).prop("class", "enterFocus" + i + "");
            }
            $(this).keydown(function(e) {
                if ($(".enterFocus" + (i + 1) + "")[0] != undefined) {
                    if (e.keyCode == 13) {
                        if ($.trim($(".enterFocus" + (i + 1) + "").prop("type")) == "text") {
                            $(".enterFocus" + (i + 1) + "").enterFocusEnd();
                        } else {
                            $(".enterFocus" + (i + 1) + "").focus();
                        }
                    }
                } else {
                    if ($.trim($(".enterFocus" + (i + 1) + "").prop("type")) == "text") {
                        $(".enterFocus" + (i) + "").enterFocusEnd();
                    } else {
                        $(".enterFocus" + (i) + "").focus();
                    }

                }
            });
        });
    });

/*
 *判断浏览器的名称及版本
 */
var BrowserDetect = {
    init: function () {
        this.browser = this.searchString(this.dataBrowser) || "An unknown browser";
        this.version = this.searchVersion(navigator.userAgent)
            || this.searchVersion(navigator.appVersion)
            || "an unknown version";
        this.OS = this.searchString(this.dataOS) || "an unknown OS";
    },
    searchString: function (data) {
        for (var i=0;i<data.length;i++) {
            var dataString = data[i].string;
            var dataProp = data[i].prop;
            this.versionSearchString = data[i].versionSearch || data[i].identity;
            if (dataString) {
                if (dataString.indexOf(data[i].subString) != -1)
                    return data[i].identity;
            }
            else if (dataProp)
                return data[i].identity;
        }
    },
    searchVersion: function (dataString) {
        var index = dataString.indexOf(this.versionSearchString);
        if (index == -1) return;
        return parseFloat(dataString.substring(index+this.versionSearchString.length+1));
    },
    dataBrowser: [
        {
            string: navigator.userAgent,
            subString: "Chrome",
            identity: "Chrome"
        },
        {   string: navigator.userAgent,
            subString: "OmniWeb",
            versionSearch: "OmniWeb/",
            identity: "OmniWeb"
        },
        {
            string: navigator.vendor,
            subString: "Apple",
            identity: "Safari",
            versionSearch: "Version"
        },
        {
            prop: window.opera,
            identity: "Opera",
            versionSearch: "Version"
        },
        {
            string: navigator.vendor,
            subString: "iCab",
            identity: "iCab"
        },
        {
            string: navigator.vendor,
            subString: "KDE",
            identity: "Konqueror"
        },
        {
            string: navigator.userAgent,
            subString: "Firefox",
            identity: "Firefox"
        },
        {
            string: navigator.vendor,
            subString: "Camino",
            identity: "Camino"
        },
        {       // for newer Netscapes (6+)
            string: navigator.userAgent,
            subString: "Netscape",
            identity: "Netscape"
        },
        {
            string: navigator.userAgent,
            subString: "MSIE",
            identity: "IE",
            versionSearch: "MSIE"
        },
        {
            string: navigator.userAgent,
            subString: "Gecko",
            identity: "Mozilla",
            versionSearch: "rv"
        },
        {       // for older Netscapes (4-)
            string: navigator.userAgent,
            subString: "Mozilla",
            identity: "Netscape",
            versionSearch: "Mozilla"
        }
    ],
    dataOS : [
        {
            string: navigator.platform,
            subString: "Win",
            identity: "Windows"
        },
        {
            string: navigator.platform,
            subString: "Mac",
            identity: "Mac"
        },
        {
               string: navigator.userAgent,
               subString: "iPhone",
               identity: "iPhone/iPod"
        },
        {
            string: navigator.platform,
            subString: "Linux",
            identity: "Linux"
        }
    ]
};

/*
 *判断字符长度
 */
function len(str) {
      var i, sum;
      sum = 0;
      for (i = 0; i < str.length; i++) {
          if ((str.charCodeAt(i) >= 0) && (str.charCodeAt(i) <= 255)) {
              sum = sum + 1;
          }
          else {
              sum = sum + 2;
          }
      }
      return sum;
};

/*
 *判断是否是日期格式
 */
function IsDate(str) {
      var re = /^\d{4}-\d{1,2}-\d{1,2}$/;
      if (re.test(str)) {
            var array = str.split('-');
            var date = new Date(array[0], parseInt(array[1], 10) - 1, array[2]);
            if (!((date.getFullYear() == parseInt(array[0], 10)) && ((date.getMonth() + 1) == parseInt(array[1], 10)) && (date.getDate() == parseInt(array[2], 10)))) {
                return false;
            }
            return true;
      }
      return false;
}

/*
 *四舍五入
 */
function round(v, e) {
      var t = 1;
      for (; e > 0; t *= 10, e--);
      for (; e < 0; t /= 10, e++);
      return Math.round(v * t) / t;
};


//#########################################################################//
/*
 *限制输入框只能输入数字(包括小数)
 *Backspace | Home | End | Delete | Enter These keys are availabale
 */ 
function checkKey(event) {
      if (window.event) { //whether IE
          if ((event.keyCode >= 48 && event.keyCode <= 57) || (event.keyCode >= 95 && event.keyCode <= 105) || (event.keyCode == 110 || event.keyCode == 8 || event.keyCode == 46 || event.keyCode == 35 || event.keyCode == 36)) {
              event.returnValue = true;
          }
          else {
              event.returnValue = false;
          }
      } else{ // FireFox
          if (!((event.which >= 48 && event.which <= 57) || (event.which >= 94 && event.which <= 105) || (event.which == 110 || event.which == 8 || event.which == 46 || event.which == 35 || event.which == 36))) {
              event.preventDefault();
          }
      }
}

/*
 *取得页面高度
 */
function pageHeight() {
      if ($.support) {
            return document.compatMode == "CSS1Compat" ? document.documentElement.clientHeight : document.body.clientHeight;
      } else {
            return self.innerHeight;
      }
};

/*
 *取得页面宽度
 */
function pageWidth() {
    if ($.support) {
        return document.compatMode == "CSS1Compat" ? document.documentElement.clientWidth : document.body.clientWidth;
    }
    else {
        return self.innerWidth;
   }
};

/** 
  * 分页
  * @param gridid 数据列表加载的id，<table id ="gridlb"></table>
  * @param qry 查询条件 即传入SQL语句对应的占位符
  * @param sql_total 统计查询记录的总数 SQL语句名称 对应system库中tb_sql
  * @param sql_initData 加载数据 SQL语句名称 对应system库中tb_sql
  * @param dLink_name   $.DataLink() 定义数据的名称 如：var dlink = $.DataLink(gridid, div_id, primary_key_name, pushcontents, keywords, directory, usedata);
  * @param grid_data_name $.Datajsongrid()定义数据的名称 如：var grid = $.Datajsongrid(dataset, gridid);
  * @param directory 目录层次 默认值为2
  * @param usedata 数据库类别 默认为1
  * @param tb_name 需要分页的数据表名
  * e.g:
  *   pager("gridlb",str_sql, "test", "test2", dLink, "", 1, "1", "tb_bagproducts");
  * 
*/
function pager(pagerid,gridid,qry, sql_total, sql_initData, dLink_name, directory, usedata, tb_name,datalink) {
    var pager = pagerid;
    var query = '';
    var ref = qry || "1=1";
    var _total = sql_total;
    var _initData = sql_initData;
    var _dLink = dLink_name;
    var _directory = directory || 2;
    var usedata = usedata || "1";
    var _tb_name = tb_name;
    var _gridid  = gridid;
    var initData = '';
    var datalink = datalink || "new";
    BrowserDetect.init(); // 浏览器判断初始化
    var Browser_Mise = BrowserDetect.browser + BrowserDetect.version; //获取浏览器版本
    $("#p_first"+pager+",#p_before"+pager+",#p_next"+pager+",#p_last"+pager+"").unbind("click");
    $("#set_page_size"+pager+"").unbind("change");
    $("#p_pager"+pager+"").unbind("keydown");
    initData = function init(_initData, query) {
        if(datalink == "old"){
            _dLink.initData(_initData, query);
        }else{
            _dLink.InitData(_initData,query);
        }
    } 
    if ($.trim($("#"+pager+"").html()) == '') {
        var str = '';
        str += "<div style='float: left; margin-top: 5px;'>共<span class='p_total' id='p_total"+pager+"'></span>条记录</div>";
        str += "<div style='float: left; margin-top: 5px;'><label style='position: relative; top: -4px; right: 5px;'>每页</label>" + "<select class='set_page_size' id='set_page_size"+pager+"'>";
        str += "<option value='50' selected='selected'>50</option>" + "<option value='75'>75</option>" + "<option value='100' >100</option>";
        str += "<option value='125'>125</option>" + "<option value='150'>150</option>" + "<option value='200'>200</option>";
        str += "</select>" + "<label style='position: relative; top: -4px; text-align: left; left: 7px;'>条</label></div>";
        str += "<div style='width: 260px; height: 20px; float: left; margin-top: 5px;'>";
        str += "<span class='p_first' id='p_first"+pager+"'>&nbsp;&nbsp;</span>";
        str += "<span class='p_before' id='p_before"+pager+"'>&nbsp;&nbsp;</span>";
        str += "<span class='p_count'>当前<span class='p_current' id='p_current"+pager+"'>1</span>&nbsp;/&nbsp;<span class='p_total_page' id='p_total_page"+pager+"'>1</span>页</span>";
        str += "<span class='p_next' id='p_next"+pager+"'>&nbsp;&nbsp;</span>";
        str += "<span class='p_last' id='p_last"+pager+"'>&nbsp;&nbsp;</span>";
        str += "</div>";
        str += "<div style='margin-left:10px;margin-top:5px'>跳转到:</div>";
        str += "<input class='p_pager' type='text' id='p_pager"+pager+"' style='height: 14px; border-radius: 5px; width: 100px; text-align: center; position: relative; left: 47px; top: -21px;'/><label style='position: relative; text-align: left; left: 53px; top: -22px;'>页</label>";
        str += "<div style='clear:both'></div><span style='clear:both'></span>"
        $("#"+pager+"").append(str);
    }
    if(BrowserDetect.browser == "IE"){
        $(".p_first,.p_last,.p_before,.p_next").css("padding-left","10px");
    }else if(BrowserDetect.browser == "Firefox"){
        $(".set_page_size").css("top","-3px")
    }

    
    // 数据初始化
    if (eval(getwebdata(_tb_name + "###" + ref, usedata, _total, _directory))[0].count != undefined) {
        var total = eval(getwebdata(_tb_name + "###" + ref, usedata, _total, _directory))[0].count; //记录总数
        $("#p_total" + pager + "").html(total);
        var p_total_page = ''; //总页码
        var p_num = $("#set_page_size" + pager + " option:selected").val(); //当前页显示数据
        if (total % p_num == 0) {
            p_total_page = parseInt(total / p_num);
        } else {
            p_total_page = parseInt(total / p_num) + 1;
        }
        $("#p_current" + pager + "").html("1");
        $("#p_total_page" + pager + "").html(p_total_page);
        query = ref + "###" + p_num + "###" + "0" + "###" + _tb_name;
        initData(_initData, query);
        if(datalink == "old"){
            $("#" + _gridid + "").setSelection(1);
        }
        // 总页数/每页显示多少条记录
        $("#set_page_size" + pager + "").change(function() {
            if(datalink == "old"){
                $("#grid1").clearGridData();
            }
            var p_num = $("#set_page_size" + pager + " option:selected").val();
            if (total % p_num == 0) {
                p_total_page = parseInt(total / p_num);
            } else {
                p_total_page = parseInt(total / p_num) + 1;
            }
            $("#p_total_page" + pager + "").html(p_total_page);
            $("#p_current" + pager + "").html(1); //当前页码
            query = ref + "###" + p_num + "###" + "0" + "###" + _tb_name;
            initData(_initData, query);
            if(datalink == "old"){
                $("#" + _gridid + "").setSelection(1);
            }
        });
        // 第一页
        $("#p_first" + pager + "").click(function() {
            var p_num = $("#set_page_size" + pager + " option:selected").html();
            query = ref + "###" + p_num + "###" + "0" + "###" + _tb_name;
            if ($("#p_current" + pager + "").html() != 1) {
                initData(_initData, query);
                if(datalink == "old"){
                    $("#" + _gridid + "").setSelection(1);
                }
                $("#p_current" + pager + "").html("1");
            }
        });
        // 前一页
        $("#p_before" + pager + "").click(function() {
            var num = parseInt($("#p_current" + pager + "").html());
            if (num > 1) {
                var a = new Array();
                $("#p_current" + pager + "").html(num - 1);
                var p = $("#p_current" + pager + "").html() - 1;
                var p_num = $("#set_page_size" + pager + " option:selected").html();
                var sum = p * p_num;
                query = ref + "###" + p_num + "###" + sum + "###" + _tb_name;
                initData(_initData, query);
                if(datalink == "old"){
                    $("#" + _gridid + "").setSelection(1);
                }
            };
        });
        // 下一页
        $("#p_next" + pager + "").click(function() {
            var num = parseInt($("#p_current" + pager + "").html());
            var total = parseInt($("#p_total_page" + pager + "").html());
            if (num < total) {
                $("#p_current" + pager + "").html(parseInt(num) + 1);
                var p = $("#p_current" + pager + "").html() - 1;
                var p_num = $("#set_page_size" + pager + " option:selected").html();
                var sum = p * p_num;
                query = ref + "###" + p_num + "###" + sum + "###" + _tb_name;
                initData(_initData, query);
                if(datalink == "old"){
                    $("#" + _gridid + "").setSelection(1);
                }
            };
        });
        //最后一页
        $("#p_last" + pager + "").click(function() {
            var p = $("#p_total_page" + pager + "").html() - 1;
            var p_num = $("#set_page_size" + pager + " option:selected").html();
            var sum = p * p_num;
            query = ref + "###" + p_num + "###" + sum + "###" + _tb_name;
            if ($("#p_current" + pager + "").html() != $("#p_total_page" + pager + "").html()) {
                initData(_initData, query);
                if(datalink == "old"){
                    $("#" + _gridid + "").setSelection(1);
                }
                $("#p_current"+ pager + "").html(p_total_page);
                $("#p_last"+ pager + "").prop("disabled", true);
            }
        });
        // 跳转到几页
        $("#p_pager" + pager + "").keydown(function(e) {
            if (e.keyCode == 13) {
                var pagershow = parseInt($("#p_pager" + pager + "").val());
                if (pagershow <= p_total_page) {
                    $("#p_current" + pager + "").html(pagershow);
                    var p = pagershow - 1;
                    var p_num = $("#set_page_size" + pager + " option:selected").html();
                    var sum = p * p_num;
                    query = ref + "###" + p_num + "###" + sum + "###" + _tb_name;
                    initData(_initData, query);
                    if(datalink == "old"){
                        $("#" + _gridid + "").setSelection(1);
                    }
                } else {
                    alert("请正确输入要跳转的页码!");
                }
            }
        })
    }else{
        $("#p_total" + pager + "").html('0');
    }
}
/**Select绑定:
 * @param selectid 对应要加载数据标签select的id
 * @param value    select标签中option的value值;
 * @param name     需要在select标签中显示的值;
 * @param code     加载数据 SQL语句名称 对应system库中tb_sql
 * @param querystr 查询条件 即传入SQL语句对应的占位符
 */
function selBind(selectid,value,name,code,querystr) {
    var jsonData =eval(getwebdata(querystr,"1",code, 2));
    for(var i=0; i<jsonData.length; i++){
        var value1="jsonData[i]."+value;
        var name1="jsonData[i]."+name;
        var str = "<option value='"+eval(value1)+"'>"+eval(name1)+"</option>";
        $(selectid).append(str);
    }
}
/*
 * 输入数字(0~9 包括小数点) || Home || Enter || Tab || Backspace || End  Enter these keys is available
 */
// BrowserDetect.init();// 浏览器判断初始化
// if (BrowserDetect.browser == "IE" && parseInt(BrowserDetect.version) < 9) {
    $.fn.numCheck = function() {
        $(this).keydown(function(e) {
            var keyCode = e.which;
            if ((keyCode >= 48 && keyCode <= 57) || keyCode == 190 || keyCode == 36 || keyCode == 35 || keyCode == 13 || keyCode == 9 || keyCode == 8 || (keyCode >= 96 && keyCode <= 105) || keyCode == 110) {
                return true;
            } else {
                return false
            }
        });
    }
    /*
     * 验证手机号码
     */
    $.fn.phoneCheck = function() {
        $(this).blur(function() {
            var thisVal = $(this).val().toString();
            if (thisVal == "") {
                $(this).next().remove();
                $(this).after("<span class='phone_alert'>电话号码不能为空</span>");
                $(".phone_alert").fadeOut(5000);
                $(this).css("border-color", "red");
            } else if (!(/^[0-9]+$/g.test(thisVal))) {
                $(this).next().remove();
                $(this).after("<span class='phone_alert'>电话号码均为数字</span>");
                $(".phone_alert").fadeOut(5000);
                $(this).css("border-color", "red");
            } else if (!(/^1[0-9]{10}$/.test(thisVal))) {
                $(this).next().remove();
                $(this).after("<span class='phone_alert'>手机号码为11位</span>");
                $(".phone_alert").fadeOut(5000);
                $(this).css("border-color", "red");
            } else {
                $(this).next().remove();
                $(this).css("border-color", "#E1E1E1");
            }
        });
    }
    /*
     *验证邮箱
     */
    $.fn.emailCheck = function() {
        $(this).blur(function() {
            var thisVal = $(this).val().toString();
            if (thisVal == "") {
                $(this).next().remove();
                $(this).after("<span class='phone_alert'>邮箱不能为空</span>");
                $(".phone_alert").fadeOut(5000);
                $(this).css("border-color", "red");
            } else if (!(/(^[\w.\-]+@(?:[a-z0-9]+(?:-[a-z0-9]+)*\.)+[a-z]{2,3}$)|(^1[3|4|5|8]\d{9}$)|(^\d{3,}$)|(^\++\d{2,})/)) {
                $(this).next().remove();
                $(this).after("<span class='phone_alert'>邮箱不正确,请重新输入!</span>");
                $(".phone_alert").fadeOut(5000);
                $(this).css("border-color", "red");
            } else {
                $(this).next().remove();
                $(this).css("border-color", "#E1E1E1");
            }
        });
    }
    /*
     *验证身份证号码
     */
    $.fn.postIDCheck = function() {
        $(this).blur(function() {
            var thisVal = $(this).val().toString();
            if (thisVal == "") {
                $(this).next().remove();
                $(this).after("<span class='phone_alert'>邮箱不能为空</span>");
                $(".phone_alert").fadeOut(5000);
                $(this).css("border-color", "red");
            } else if (!(/^[a-z]([a-z0-9]*[-_]?[a-z0-9]+)*@([a-z0-9]*[-_]?[a-z0-9]+)+[\.][a-z]{2,3}([\.][a-z]{2})?$/i.test(thisVal))) {
                $(this).next().remove();
                $(this).after("<span class='phone_alert'>邮箱不正确,请重新输入!</span>");
                $(".phone_alert").fadeOut(5000);
                $(this).css("border-color", "red");
            } else {
                $(this).next().remove();
                $(this).css("border-color", "#E1E1E1");
            }
        });
    }
// }


var strChineseFirstPY = "YDYQSXMWZSSXJBYMGCCZQPSSQBYCDSCDQLDYLYBSSJGYZZJJFKCCLZDHWDWZJLJPFYYNWJJTMYHZWZHFLZPPQHGSCYYYNJQYXXGJHHSDSJNKKTMOMLCRXYPSNQSECCQZGGLLYJLMYZZSECYKYYHQWJSSGGYXYZYJWWKDJHYCHMYXJTLXJYQBYXZLDWRDJRWYSRLDZJPCBZJJBRCFTLECZSTZFXXZHTRQHYBDLYCZSSYMMRFMYQZPWWJJYFCRWFDFZQPYDDWYXKYJAWJFFXYPSFTZYHHYZYSWCJYXSCLCXXWZZXNBGNNXBXLZSZSBSGPYSYZDHMDZBQBZCWDZZYYTZHBTSYYBZGNTNXQYWQSKBPHHLXGYBFMJEBJHHGQTJCYSXSTKZHLYCKGLYSMZXYALMELDCCXGZYRJXSDLTYZCQKCNNJWHJTZZCQLJSTSTBNXBTYXCEQXGKWJYFLZQLYHYXSPSFXLMPBYSXXXYDJCZYLLLSJXFHJXPJBTFFYABYXBHZZBJYZLWLCZGGBTSSMDTJZXPTHYQTGLJSCQFZKJZJQNLZWLSLHDZBWJNCJZYZSQQYCQYRZCJJWYBRTWPYFTWEXCSKDZCTBZHYZZYYJXZCFFZZMJYXXSDZZOTTBZLQWFCKSZSXFYRLN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BYFZJFRYSFMBYZHQGFWZSYFYJJPHZBYYZFFWODGRLMFTWLBZGYCQXCDJYGZYYYYTYTYDWEGAZYHXJLZYYHLRMGRXXZCLHNELJJTJTPWJYBJJBXJJTJTEEKHWSLJPLPSFYZPQQBDLQJJTYYQLYZKDKSQJYYQZLDQTGJQYZJSUCMRYQTHTEJMFCTYHYPKMHYZWJDQFHYYXWSHCTXRLJHQXHCCYYYJLTKTTYTMXGTCJTZAYYOCZLYLBSZYWJYTSJYHBYSHFJLYGJXXTMZYYLTXXYPZLXYJZYZYYPNHMYMDYYLBLHLSYYQQLLNJJYMSOYQBZGDLYXYLCQYXTSZEGXHZGLHWBLJHEYXTWQMAKBPQCGYSHHEGQCMWYYWLJYJHYYZLLJJYLHZYHMGSLJLJXCJJYCLYCJPCPZJZJMMYLCQLNQLJQJSXYJMLSZLJQLYCMMHCFMMFPQQMFYLQMCFFQMMMMHMZNFHHJGTTHHKHSLNCHHYQDXTMMQDCYZYXYQMYQYLTDCYYYZAZZCYMZYDLZFFFMMYCQZWZZMABTBYZTDMNZZGGDFTYPCGQYTTSSFFWFDTZQSSYSTWXJHXYTSXXYLBYQHWWKXHZXWZNNZZJZJJQJCCCHYYXBZXZCYZTLLCQXYNJYCYYCYNZZQYYYEWYCZDCJYCCHYJLBTZYYCQWMPWPYMLGKDLDLGKQQBGYCHJXY";
//此处收录了375个多音字
var oMultiDiff={"19969":"DZ","19975":"WM","19988":"QJ","20048":"YL","20056":"SC","20060":"NM","20094":"QG","20127":"QJ","20167":"QC","20193":"YG","20250":"KH","20256":"ZC","20282":"SC","20285":"QJG","20291":"TD","20314":"YD","20340":"NE","20375":"TD","20389":"YJ","20391":"CZ","20415":"PB","20446":"YS","20447":"SQ","20504":"TC","20608":"KG","20854":"QJ","20857":"ZC","20911":"PF","20504":"TC","20608":"KG","20854":"QJ","20857":"ZC","20911":"PF","20985":"AW","21032":"PB","21048":"XQ","21049":"SC","21089":"YS","21119":"JC","21242":"SB","21273":"SC","21305":"YP","21306":"QO","21330":"ZC","21333":"SDC","21345":"QK","21378":"CA","21397":"SC","21414":"XS","21442":"SC","21477":"JG","21480":"TD","21484":"ZS","21494":"YX","21505":"YX","21512":"HG","21523":"XH","21537":"PB","21542":"PF","21549":"KH","21571":"E","21574":"DA","21588":"TD","21589":"O","21618":"ZC","21621":"KHA","21632":"ZJ","21654":"KG","21679":"LKG","21683":"KH","21710":"A","21719":"YH","21734":"WOE","21769":"A","21780":"WN","21804":"XH","21834":"A","21899":"ZD","21903":"RN","21908":"WO","21939":"ZC","21956":"SA","21964":"YA","21970":"TD","22003":"A","22031":"JG","22040":"XS","22060":"ZC","22066":"ZC","22079":"MH","22129":"XJ","22179":"XA","22237":"NJ","22244":"TD","22280":"JQ","22300":"YH","22313":"XW","22331":"YQ","22343":"YJ","22351":"PH","22395":"DC","22412":"TD","22484":"PB","22500":"PB","22534":"ZD","22549":"DH","22561":"PB","22612":"TD","22771":"KQ","22831":"HB","22841":"JG","22855":"QJ","22865":"XQ","23013":"ML","23081":"WM","23487":"SX","23558":"QJ","23561":"YW","23586":"YW","23614":"YW","23615":"SN","23631":"PB","23646":"ZS","23663":"ZT","23673":"YG","23762":"TD","23769":"ZS","23780":"QJ","23884":"QK","24055":"XH","24113":"DC","24162":"ZC","24191":"GA","24273":"QJ","24324":"NL","24377":"TD","24378":"QJ","24439":"PF","24554":"ZS","24683":"TD","24694":"WE","24733":"LK","24925":"TN","25094":"ZG","25100":"XQ","25103":"XH","25153":"PB","25170":"PB","25179":"KG","25203":"PB","25240":"ZS","25282":"FB","25303":"NA","25324":"KG","25341":"ZY","25373":"WZ","25375":"XJ","25384":"A","25457":"A","25528":"SD","25530":"SC","25552":"TD","25774":"ZC","25874":"ZC","26044":"YW","26080":"WM","26292":"PB","26333":"PB","26355":"ZY","26366":"CZ","26397":"ZC","26399":"QJ","26415":"ZS","26451":"SB","26526":"ZC","26552":"JG","26561":"TD","26588":"JG","26597":"CZ","26629":"ZS","26638":"YL","26646":"XQ","26653":"KG","26657":"XJ","26727":"HG","26894":"ZC","26937":"ZS","26946":"ZC","26999":"KJ","27099":"KJ","27449":"YQ","27481":"XS","27542":"ZS","27663":"ZS","27748":"TS","27784":"SC","27788":"ZD","27795":"TD","27812":"O","27850":"PB","27852":"MB","27895":"SL","27898":"PL","27973":"QJ","27981":"KH","27986":"HX","27994":"XJ","28044":"YC","28065":"WG","28177":"SM","28267":"QJ","28291":"KH","28337":"ZQ","28463":"TL","28548":"DC","28601":"TD","28689":"PB","28805":"JG","28820":"QG","28846":"PB","28952":"TD","28975":"ZC","29100":"A","29325":"QJ","29575":"SL","29602":"FB","30010":"TD","30044":"CX","30058":"PF","30091":"YSP","30111":"YN","30229":"XJ","30427":"SC","30465":"SX","30631":"YQ","30655":"QJ","30684":"QJG","30707":"SD","30729":"XH","30796":"LG","30917":"PB","31074":"NM","31085":"JZ","31109":"SC","31181":"ZC","31192":"MLB","31293":"JQ","31400":"YX","31584":"YJ","31896":"ZN","31909":"ZY","31995":"XJ","32321":"PF","32327":"ZY","32418":"HG","32420":"XQ","32421":"HG","32438":"LG","32473":"GJ","32488":"TD","32521":"QJ","32527":"PB","32562":"ZSQ","32564":"JZ","32735":"ZD","32793":"PB","33071":"PF","33098":"XL","33100":"YA","33152":"PB","33261":"CX","33324":"BP","33333":"TD","33406":"YA","33426":"WM","33432":"PB","33445":"JG","33486":"ZN","33493":"TS","33507":"QJ","33540":"QJ","33544":"ZC","33564":"XQ","33617":"YT","33632":"QJ","33636":"XH","33637":"YX","33694":"WG","33705":"PF","33728":"YW","33882":"SR","34067":"WM","34074":"YW","34121":"QJ","34255":"ZC","34259":"XL","34425":"JH","34430":"XH","34485":"KH","34503":"YS","34532":"HG","34552":"XS","34558":"YE","34593":"ZL","34660":"YQ","34892":"XH","34928":"SC","34999":"QJ","35048":"PB","35059":"SC","35098":"ZC","35203":"TQ","35265":"JX","35299":"JX","35782":"SZ","35828":"YS","35830":"E","35843":"TD","35895":"YG","35977":"MH","36158":"JG","36228":"QJ","36426":"XQ","36466":"DC","36710":"JC","36711":"ZYG","36767":"PB","36866":"SK","36951":"YW","37034":"YX","37063":"XH","37218":"ZC","37325":"ZC","38063":"PB","38079":"TD","38085":"QY","38107":"DC","38116":"TD","38123":"YD","38224":"HG","38241":"XTC","38271":"ZC","38415":"YE","38426":"KH","38461":"YD","38463":"AE","38466":"PB","38477":"XJ","38518":"YT","38551":"WK","38585":"ZC","38704":"XS","38739":"LJ","38761":"GJ","38808":"SQ","39048":"JG","39049":"XJ","39052":"HG","39076":"CZ","39271":"XT","39534":"TD","39552":"TD","39584":"PB","39647":"SB","39730":"LG","39748":"TPB","40109":"ZQ","40479":"ND","40516":"HG","40536":"HG","40583":"QJ","40765":"YQ","40784":"QJ","40840":"YK","40863":"QJG"};
//参数,中文字符串
//返回值:拼音首字母串数组
function makePy(str){
    if(typeof(str) != "string")
    throw new Error(-1,"函数makePy需要字符串类型参数!");
    var arrResult = new Array(); //保存中间结果的数组
    for(var i=0,len=str.length;i<len;i++){
        //获得unicode码
        var ch = str.charAt(i);
        //检查该unicode码是否在处理范围之内,在则返回该码对映汉字的拼音首字母,不在则调用其它函数处理
        arrResult.push(checkCh(ch));
    }
    //处理arrResult,返回所有可能的拼音首字母串数组
    return mkRslt(arrResult);
}
function checkCh(ch){
    var uni = ch.charCodeAt(0);
    //如果不在汉字处理范围之内,返回原字符,也可以调用自己的处理函数
    if(uni > 40869 || uni < 19968)
        return ch; //dealWithOthers(ch);
    //检查是否是多音字,是按多音字处理,不是就直接在strChineseFirstPY字符串中找对应的首字母
    return (oMultiDiff[uni]?oMultiDiff[uni]:(strChineseFirstPY.charAt(uni-19968)));
}
function mkRslt(arr){
    var arrRslt = [""];
    for(var i=0,len=arr.length;i<len;i++){
        var str = arr[i];
        var strlen = str.length;
        if(strlen == 1){
            for(var k=0;k<arrRslt.length;k++){
                arrRslt[k] += str;
            }
        }else{
            var tmpArr = arrRslt.slice(0);
            arrRslt = [];
            for(k=0;k<strlen;k++){
                //复制一个相同的arrRslt
                var tmp = tmpArr.slice(0);
                //把当前字符str[k]添加到每个元素末尾
                for(var j=0;j<tmp.length;j++){
                    tmp[j] += str.charAt(k);
                }
                //把复制并修改后的数组连接到arrRslt上
                arrRslt = arrRslt.concat(tmp);
            }
        }
    }
    return arrRslt;
}


//拼音码
function getPYCode(str) {
    var result = "";
    for (var i = 0; i < str.length; i++) {
        result += getPY(str.charAt(i).toString())
    }
    return result
}

function getPY(s) {
    if (s != "") {
        execScript("tmp=asc(\"" + s + "\")", "vbscript");
        tmp = 65536 + tmp;
        var py = "";
        if (tmp >= 45217 && tmp <= 45252) {
            py = "A"
        } else if (tmp >= 45253 && tmp <= 45760) {
            py = "B"
        } else if (tmp >= 45761 && tmp <= 46317) {
            py = "C"
        } else if (tmp >= 46318 && tmp <= 46825) {
            py = "D"
        } else if (tmp >= 46826 && tmp <= 47009) {
            py = "E"
        } else if (tmp >= 47010 && tmp <= 47296) {
            py = "F"
        } else if ((tmp >= 47297 && tmp <= 47613) || (tmp == 63193)) {
            py = "G"
        } else if (tmp >= 47614 && tmp <= 48118) {
            py = "H"
        } else if (tmp >= 48119 && tmp <= 49061) {
            py = "J"
        } else if (tmp >= 49062 && tmp <= 49323) {
            py = "K"
        } else if (tmp >= 49324 && tmp <= 49895) {
            py = "L"
        } else if (tmp >= 49896 && tmp <= 50370) {
            py = "M"
        } else if (tmp >= 50371 && tmp <= 50613) {
            py = "N"
        } else if (tmp >= 50614 && tmp <= 50621) {
            py = "O"
        } else if (tmp >= 50622 && tmp <= 50905) {
            py = "P"
        } else if (tmp >= 50906 && tmp <= 51386) {
            py = "Q"
        } else if (tmp >= 51387 && tmp <= 51445) {
            py = "R"
        } else if (tmp >= 51446 && tmp <= 52217) {
            py = "S"
        } else if (tmp >= 52218 && tmp <= 52697) {
            py = "T"
        } else if (tmp >= 52698 && tmp <= 52979) {
            py = "W"
        } else if (tmp >= 52980 && tmp <= 53688) {
            py = "X"
        } else if (tmp >= 53689 && tmp <= 54480) {
            py = "Y"
        } else if (tmp >= 54481 && tmp <= 62289) {
            py = "Z"
        } else {
            py = s.charAt(0)
        }
        return py
    }
}

/**
 * Cookie plugin
 *
 * Copyright (c) 2006 Klaus Hartl (stilbuero.de)
 * Dual licensed under the MIT and GPL licenses:
 * http://www.opensource.org/licenses/mit-license.php
 * http://www.gnu.org/licenses/gpl.html
 *
 */

/**
 * Create a cookie with the given name and value and other optional parameters.
 *
 * @example $.cookie('the_cookie', 'the_value');
 * @desc Set the value of a cookie.
 * @example $.cookie('the_cookie', 'the_value', {expires: 7, path: '/', domain: 'jquery.com', secure: true});
 * @desc Create a cookie with all available options.
 * @example $.cookie('the_cookie', 'the_value');
 * @desc Create a session cookie.
 * @example $.cookie('the_cookie', null);
 * @desc Delete a cookie by passing null as value.
 *
 * @param String name The name of the cookie.
 * @param String value The value of the cookie.
 * @param Object options An object literal containing key/value pairs to provide optional cookie attributes.
 * @option Number|Date expires Either an integer specifying the expiration date from now on in days or a Date object.
 *                             If a negative value is specified (e.g. a date in the past), the cookie will be deleted.
 *                             If set to null or omitted, the cookie will be a session cookie and will not be retained
 *                             when the the browser exits.
 * @option String path The value of the path atribute of the cookie (default: path of page that created the cookie).
 * @option String domain The value of the domain attribute of the cookie (default: domain of page that created the cookie).
 * @option Boolean secure If true, the secure attribute of the cookie will be set and the cookie transmission will
 *                        require a secure protocol (like HTTPS).
 * @type undefined
 *
 * @name $.cookie
 * @cat Plugins/Cookie
 * @author Klaus Hartl/klaus.hartl@stilbuero.de
 */

/**
 * Get the value of a cookie with the given name.
 *
 * @example $.cookie('the_cookie');
 * @desc Get the value of a cookie.
 *
 * @param String name The name of the cookie.
 * @return The value of the cookie.
 * @type String
 *
 * @name $.cookie
 * @cat Plugins/Cookie
 * @author Klaus Hartl/klaus.hartl@stilbuero.de
 */
jQuery.cookie = function(name, value, options) {
    if (typeof value != 'undefined') { // name and value given, set cookie
        options = options || {};
        if (value === null) {
            value = '';
            options.expires = -1;
        }
        var expires = '';
        if (options.expires && (typeof options.expires == 'number' || options.expires.toUTCString)) {
            var date;
            if (typeof options.expires == 'number') {
                date = new Date();
                date.setTime(date.getTime() + (options.expires * 24 * 60 * 60 * 1000));
            } else {
                date = options.expires;
            }
            expires = '; expires=' + date.toUTCString(); // use expires attribute, max-age is not supported by IE
        }
        var path = options.path ? '; path=' + options.path : '; path=/';
        var domain = options.domain ? '; domain=' + options.domain : '';
        var secure = options.secure ? '; secure' : '';
        document.cookie = [name, '=', encodeURIComponent(value), expires, path, domain, secure].join('');
    } else { // only name given, get cookie
        var cookieValue = null;
        if (document.cookie && document.cookie != '') {
            var cookies = document.cookie.split(';');
            for (var i = 0; i < cookies.length; i++) {
                var cookie = jQuery.trim(cookies[i]);
                // Does this cookie string begin with the name we want?
                if (cookie.substring(0, name.length + 1) == (name + '=')) {
                    cookieValue = decodeURIComponent(cookie.substring(name.length + 1));
                    break;
                }
            }
        }
        return cookieValue;
    }
};

/**
 * jquery.ui.datepicker-zh-CN.js
 */
/* Chinese initialisation for the jQuery UI date picker plugin. */
/* Written by Cloudream (cloudream@gmail.com). */
jQuery(function($){
    $.datepicker.regional['zh-CN'] = {
        closeText: '关闭',
        prevText: '&#x3c;上月',
        nextText: '下月&#x3e;',
        currentText: '今天',
        monthNames: ['一月','二月','三月','四月','五月','六月',
        '七月','八月','九月','十月','十一月','十二月'],
        monthNamesShort: ['一','二','三','四','五','六',
        '七','八','九','十','十一','十二'],
        dayNames: ['星期日','星期一','星期二','星期三','星期四','星期五','星期六'],
        dayNamesShort: ['周日','周一','周二','周三','周四','周五','周六'],
        dayNamesMin: ['日','一','二','三','四','五','六'],
        weekHeader: '周',
        dateFormat: 'yy-mm-dd',
        firstDay: 1,
        isRTL: false,
        showMonthAfterYear: true,
        //yearSuffix: '年'
        yearSuffix: ''
        };
    $.datepicker.setDefaults($.datepicker.regional['zh-CN']);
});
